﻿#pragma once
#include "Transform.h"
#include <string>
#include <list>

namespace DYEngine
{
	class Node
	{
	public:
		Node();
		Node(const std::string& pName);
		virtual ~Node();
	public:
		inline void SetName(const std::string& pName)
		{
			name = pName;
		}

		inline std::string GetName() const
		{
			return name;
		}

		inline void SetParent(Node* pParent)
		{
			mParent = pParent;
		}

		inline Node* GetParent() const
		{
			return mParent;
		}

		inline void AddChild(Node* pChild)
		{
			mChildren.push_back(pChild);
		}

		inline void RemoveChild(Node* pChild)
		{
			mChildren.remove(pChild);
		}

		inline Transform* GetTransform()
		{
			return &mTransform;
		}

	protected:
		std::string name;
		Transform mTransform;
		Node* mParent;
		std::list<Node*> mChildren;
	};
}


